← Back to issue list

“ModuleNotFoundError: No module named ‘distutils.util’” when trying to build snaps on Launchpad (but works locally)

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1864589
Type
issue
State
open
Author
~pieq
Labels
Created
2020-02-25 03:57:42.368447+00:00
Updated
2021-08-12 15:32:09.182690+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

This initially started as a discussion on the forum, so the whole gist of the problem is explained there: https://forum.snapcraft.io/t/modulenotfounderror-no-module-named-distutils-util-when-trying-to-build-snaps-on-launchpad-but-works-locally/15434 In a nutshell: - A snapcraft recipe can be build locally on my laptop, but fails to build on Launchpad build infrastructure due to "No module named 'distutils.util'" error. - The problem seems to be that there are some parts built before the part where it fails, pulling some python3 dependencies (but not python3-distutils) that are cached in the stage directory - When the main part is built, snapcraft tries to used cached data instead of pulling fresh one, resulting in a missing dependency Workaround In my case, cjp256 suggested to add `python3-distutils` to sosreport part `stage-packages`.

Evaluation history

No evaluation history available.